<template>
	<el-tabs v-model="active">
		<el-tab-pane
			:label="item.label"
			:name="item.value"
			v-for="item in formData"
			:key="item.label"
			@tab-click="changeTab">
		</el-tab-pane>
	</el-tabs>
</template>

<script>
export default {
	props:["formData","default"],
	data() {
		return {
			active:""
		};
	},
	watch:{
		active(val){
			this.$emit('changeTab',this.active);
		}
	},
	methods:{
		changeTab:function(e){
			console.log(e)
		}
	},
	mounted(){
		this.active = this.default;
	}
};
</script>

<style lang="scss" scoped>
	//饿了么样式
	/deep/ .el-tabs__nav-wrap::after{
		background-color: #fff;
	}
</style>
